import axios from './api' // 倒入 api
import config from './config.js' // 倒入默认配置
export const BASEURL = config.baseURL

/* 将所有接口统一起来便于维护
 * 如果项目很大可以将 url 独立成文件，接口分成不同的模块
 */

// 财务管理-预约处理-获取列表
export const GET_APPOINTMENTHANDLE_SEARCH = (params) => {
    return axios({
        url: 'finance/appointmentHandle/search',
        method: 'GET',
        params,
    })
}

// 财务管理-预约处理-导出
export const GET_APPOINTMENTHANDLE_EXPORT = BASEURL + 'finance/appointmentHandle/export'

// 财务管理-预约处理-预约到期处理
export const SAVE_APPOINTMENT_HANDLE = (params) => {
    return axios({
        url: 'finance/appointment/handle',
        method: 'POST',
        data: params,
    })
}

// 财务管理-预约处理-导入
export const SAVE_APPOINTMENTHANDLE_HIMPORT = BASEURL + 'finance/appointmentHandle/import'

// 财务管理-结算明细-获取列表
export const GET_SETTLEMENTDETAILS_SEARCH = (params) => {
    return axios({
        url: 'finance/settlementDetails/search',
        method: 'GET',
        params,
    })
}

// 财务管理-结算明细-结算修改
export const MODIFY_SETTLEMENTDETAILS = (params) => {
    return axios({
        url: 'finance/settlementDetails/modify',
        method: 'POST',
        data: params,
    })
}

// 财务管理-结算明细-导出
export const GET_SETTLEMENTDETAILS_EXPORT = BASEURL + 'finance/settlementDetails/export'

// 财务管理-账单记录-获取列表
export const GET_BILLINGRECORDS_SEARCH = (params) => {
    return axios({
        url: 'finance/billingRecords/search',
        method: 'GET',
        params,
    })
}

// 财务管理-账单记录-导出
export const GET_BILLINGRECORDS_EXPORT = BASEURL + 'finance/billingRecords/export'

// 财务管理-账单记录-单个导出
export const GET_BILLINGRECORDS_SINGLEEXPORT = BASEURL + 'finance/billingRecords/singleExport'

// 财务管理-账单总览-获取列表
export const GET_SETTLEMENTOVERVIEW_SEARCH = (params) => {
    return axios({
        url: 'finance/settlementOverview/search',
        method: 'GET',
        params,
    })
}

// 财务管理-账单总览-导出
export const GET_SETTLEMENTOVERVIEW_EXPORT = BASEURL + 'finance/settlementOverview/export'

// 财务管理-数据对照-获取列表
export const GET_DATACOMPARISON_SEARCH = (params) => {
    return axios({
        url: 'finance/dataComparison/search',
        method: 'GET',
        params,
    })
}

// 财务管理-数据对照-导出
export const GET_DATACOMPARISON_EXPORT = BASEURL + 'finance/dataComparison/export'

// 财务管理-预约到期处理-获取详情
export const GET_SETTLEMENTDETAILS_INFO = (params) => {
    return axios({
        url: 'finance/settlementDetails/info',
        method: 'GET',
        params,
    })
}

// 输出结算-获取列表
export const GET_SETTLEMENTDETAILS_LIST = (params) => {
    return axios({
        url: 'finance/settlementDetails/list',
        method: 'GET',
        params,
    })
}

// 输出结算-保存并导出
export const GET_SETTLEMENTDETAILS_OUTPUTANDSAVE = (params) => {
    return axios({
        url: 'finance/settlementDetails/outputAndSave',
        method: 'POST',
        data: params,
    })
}

// 输出结算-删除
export const DELETE_SETTLEMENTDETAILS = (params) => {
    return axios({
        url: 'finance/settlementDetails/delete',
        method: 'GET',
        params,
    })
}

// 账单记录-结算完成
export const SAVE_BILLINGRECORDS_SETTLED = (params) => {
    return axios({
        url: 'finance/billingRecords/settled',
        method: 'POST',
        data: params,
    })
}

// 账单记录-获取详情
export const GET_BILLINGRECORDS_INFO = (params) => {
    return axios({
        url: 'finance/billingRecords/info',
        method: 'GET',
        params,
    })
}

// 数据对照-获取详情
export const GET_DATACOMPARISON_DIFFINFO = (params) => {
    return axios({
        url: 'finance/dataComparison/diffInfo',
        method: 'GET',
        params,
    })
}

// 财务-结算明细-删除
export const DELETE_SETTLEMENT_DETAIL = (params) => {
    return axios({
        url: 'finance/settlementDetail/delete',
        method: 'GET',
        params,
    })
}

// 财务-数据对照-删除
export const DELETE_BILLINGRECORDS_DETAIL = (params) => {
    return axios({
        url: 'finance/billingRecords/remove',
        method: 'GET',
        params,
    })
}

// 财务-
export const GET_ORGANIZATION_FULLORGTREE = (params) => {
    return axios({
        url: 'organization/fullorgtree',
        method: 'GET',
        params,
    })
}